/*
 * Sensor.java
 *
 * Created on May 31, 2008, 11:31 PM
 *
 *  This is the generic model for Sensor function:
 *  Sensors hold a state, being their last recorded data
 *  the state is a double[] whose size will vary by the 
 *  Sensor type. 
 *  Typically the last index will be a timestamp
 *  Sensors should only be updated by daemon threads, and never manually.
 *  All user calls for sensor data should be through the last recorded state.
 */
package org.gunncs.actoriface;

import java.io.*;

/**
 * 
 * @author Anandg
 */
public abstract class Sensor {

    private double[] state;

    public synchronized double[] getState() {
        return state;
    }

    public void setState(double[] newstate) {
        state = newstate;
    }

    public abstract String getName();
    public abstract int getID();

    public abstract void update(Thread daemon)
            throws InterruptedException, IOException;
}
